from http.client import responses

import requests

import config
from utils import common_assert



class LoginXhx():
    def __init__(self):
        self.url = config.URL_xhx_login

    def login_Xhx(self,session):
        json_data = {"serviceGroup": "sit", "username": "13221080002", "password": "123456"}
        session.post(self.url,json=json_data)
        return session.post(self.url,json_data)

        # print(response.json())
        # xhx_token = response.json().get("data")
        # if xhx_token:
        #     data = config.load_config()
        #     data["xhx_token"] = xhx_token
        #     config.save_config(data)
        # else:
        #     print("未获得xhx_token")
